<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Set render engine for 360 browser -->
    <meta name="renderer" content="webkit">

    <title>汽保王国商家后台管理系统</title>
    <link rel="stylesheet" href="../css/bootstrap.min.css">
    <style>
        [v-cloak] {
            display: none;
        }

        #main .inner {
            width: 1000px;
            margin: 30px auto;
        }

        .inner p {
            margin: 10px 0;
            font-size:14px;
        }

        .inner p span {
            width: 120px;
            text-align: right;
            display: inline-block;
            margin-right: 10px;
            vertical-align: top;
        }
        .inner img{
            display: inline-block;
            width:375px;
        }
    </style>
    <!--[if lte IE 9]>
    <style type="text/css">
        input, textarea {
            color: #000;
        }

        .placeholder {
            color: #aaa;
        }

        .form-horizontal .control-label {
            padding-top: 0;
        }

    </style>
    <![endif]-->

    <script src="../js/jquery-1.12.4.min.js"></script>
    <script src="../js/bootstrap.min.js"></script>
    <script src="../js/plugins/layer/layer.js"></script>
    <script src="./js/common.js"></script>

    <script type="text/javascript">
        jQuery.ajaxSetup({
            headers: {
                'X-CSRF-TOKEN': jQuery('meta[name="csrf-token"]').attr('content')
            }
        });


        if (!$('#rIframe', parent.document.body).prop('id')) {
            window.paceOptions = {
                startOnPageLoad: false
            };
        }
    </script>
    <script src="./js/vue.js"></script>

</head>
<body>

<div class="container" id="main" v-cloak>
    <div class="row">
        <div class="col-sm-offset-1 col-sm-4">
            <div class="inner">
                <p><span>店名:</span>{{store.title}}</p>
                <p><span>店主:</span>{{store.username}}</p>
                <p><span>联系方式:</span>{{store.phone}}</p>
                <p><span>店招:</span><img :src="store.avatar" alt=""></p>
                <p><span>营业执照:</span><img :src="store.zhizhao" alt=""></p>
            </div>

        </div>
    </div>

</div>
<script>
    var vm = new Vue({
        el: "#main",
        data: function () {
            return {
                store: ''
            }
        },
        mounted(){
            this.getDetail()
        },
        methods:{
            getDetail(){
                var that = this;
                $.ajax({
                    url:base_url+'/api/getShopsDetail',
                    data:{
                        api_token:localStorage.api_token,
                        type:1,
                        p:'w'
                    },
                    type:'get',
                    success:function(res){
                        console.log(res);
                        if(res.status==1){
                            that.store = res.data;
                        }
                    },
                    error:function(error){
                        console.log(error)
                    }
                })
            }
        }
    })
</script>
</body>
</html>


